import request from '@/utils/request'

// 查询房间列表
export function listType(query) {
  return request({
    url: '/hotelRoom/list',
    method: 'get',
    params: query
  })
}
// 分页查询房间列表
export function listRoomByPage(query) {
  return request({
    url: '/hotelRoom/page',
    method: 'get',
    params: query
  })
}
// 查询房间详细
export function getType(roomId) {
  return request({
    url: '/hotelRoom/' + roomId,
    method: 'get'
  })
}

// 新增房间
export function addType(data) {
  return request({
    url: '/hotelRoom',
    method: 'post',
    data: data
  })
}

// 修改房间
export function updateType(data) {
  return request({
    url: '/hotelRoom',
    method: 'put',
    data: data
  })
}

// 删除房间
export function delType(roomTypeId) {
  return request({
    url: '/hotelRoom/delete/' + roomTypeId,
    method: 'delete'
  })
}
